#ifndef __ENGINE_H__
#define __ENGINE_H__

#include <dml/dml.h>
#include <extensions/gldml.h>
#include <conio.h>
#include <stdlib.h>

#include "glext.h"      // Sample's header file
#include "vector3f.h"

PFNGLACTIVETEXTUREPROC       glActiveTexture       = NULL;
PFNGLMULTITEXCOORD2FPROC     glMultiTexCoord2f     = NULL;
PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture = NULL;


#define MAXFACES 65535
#define MAXVERTICES 65535

typedef struct {
    float x,y,z;
    } s_vertex;

typedef struct {
    float x,y,z;
    } s_normals;

typedef struct {
    float u,v;
    } s_tvertex;

typedef struct {
    int a,b,c;
    int ta,tb,tc;
    int na,nb,nc;
    } s_face;
    
typedef struct {
    vector3f g_vTangents;
    vector3f g_vBiNormals;
    vector3f g_vNormals;
} s_tangents;

typedef struct {
    s_vertex *vertex;
    s_tvertex *tvertex;
    s_face *face;
    s_normals *normals;
    s_tangents *tangents;
    int numvertices,numtvertices,numfaces,numnormals;
    } s_mesh;



void drawobject(s_mesh *mesh);                                                  //teken  object
void LoadMesh(char *fn,s_mesh *mesh);                                           //laad   object
void DeleteMesh(s_mesh *mesh);                                                  //delete object
#endif
